/*
 * Types.h
 *
 *  Created on: 03/09/2012
 *      Author: uidv1378
 */

#ifndef TYPES_H_
#define TYPES_H_

/**_____________________________________________________________________________________________
    |
    | \brief Redefinition of types
	|_____________________________________________________________________________________________*/
    typedef unsigned char		uint8;
	typedef unsigned short		uint16;
	typedef unsigned long		uint32;

	typedef signed char         int8;
	typedef signed short        int16;
	typedef signed long         int32;

	typedef unsigned char       bool;

	typedef signed char *    	STRING;
	
	typedef void (* pFunc_t) (void);
	typedef void (* pFuncParam_t) (uint8 x);

	/*******************************************************************************/
	/*!
	      \def    TRUE
	      \brief
	*/
	/*******************************************************************************/
	#ifndef TRUE
	#define TRUE  (1)
	#endif
	
	#ifndef True
	#define True  (1)
	#endif
	/*******************************************************************************/
	/*!
	      \def    FALSE
	      \brief
	*/
	/*******************************************************************************/
	#ifndef FALSE
	#define FALSE (0)
	#endif
	
	#ifndef False
	#define False (0)
	#endif

	#ifndef NULL
	#define NULL ((void *)0)
	#endif 
	
	
	/* ___________________________________________________________________________________________
	 *                                integer-type constants 
	 */
	/* NOTE:
	    '\001' is an 8bit wide literal 1.
	    These constants are meant to be used by the pre-processor only.
	    When using them in compiler context, use an appropriate cast.
	    QAC currently does not complain about assigning e.g. On to any uint<n> variable,
	     because the 8bit definition is narrower or equally wide.
	    sizeof(1U), sizeof(1UL), sizeof(On) is always the preferred width (e.g. 4). Only
	     sizeof literals wider than preferred width (e.g. 1ULL) is different.
	 */
	#define Yes       '\001'                  /* 8bit Integer-type value for Yes   */
	#define No        '\000'                  /* 8bit Integer-type value for No    */
	#define On        '\001'                  /* 8bit Integer-type value for On    */
	#define Off       '\000'                  /* 8bit Integer-type value for Off   */
	#define Ok        '\001'                  /* 8bit Integer-type value for Ok    */
	#define NotOk     '\000'                  /* 8bit Integer-type value for NotOk */
	
#endif /* TYPES_H_ */
